<%-- 
    Document   : register
    Created on : 12.02.2014, 16:59:52
    Author     : Corvus 11
--%>

<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="core" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
<%@ page contentType="text/html" pageEncoding="UTF-8"%>

<tiles:insertDefinition name="baseTemplate">
    <tiles:putAttribute name="title">
        <title>Регистрация</title>
    </tiles:putAttribute>
        <tiles:putAttribute name="body">
        <div id="register_container">
                <form:form method="POST" commandName="registerCommandForm" action="register">
                    <form:hidden path="employeeId"/>
                    <form:hidden path="fio"/>
                    <table class="table">
                        <tr>
                            <td colspan="3"><b>Регистрируется: </b></td>
                        </tr>
                        <tr>
                            <td colspan="3"><i>${registerCommandForm.fio}</i></td>
                        </tr>
                        <tr>
                            <td>Логин: </td>
                            <td><form:input path="login"/> </td>
                            <td><form:errors path="login"/> </td>
                        </tr>
                        <tr>
                            <td>Пароль: </td>
                            <td><form:password path="password"/> </td>
                            <td><form:errors path="password"/> </td>
                        </tr>
                        <tr>
                            <td>Повторите пароль: </td>
                            <td><form:password path="confirmPassword"/> </td>
                            <td><form:errors path="confirmPassword"/> </td>
                        </tr>
                        <tr>
                            <td>Выдать права: </td>
                            <td><form:checkbox path="hr"/> HR </td>
                            <td><form:checkbox path="manager"/> Менеджер </td>
                        </tr>
                        <tr>
                            <td><input id="reset_register" name="reset_register" value="Сброс" type="reset"></td>
                            <td colspan="2"><input id="register_user" name="register_user" value="ОК" type="submit"></td>
                        </tr>
                    </table>
                </form:form>
                <form id="back_button" action="login" method="get">
                    <table class="table"><tr><td><input type="submit" value="Назад"></td></tr></table>
                </form>
        </div>
        </tiles:putAttribute>
</tiles:insertDefinition>